package com.pig.pojo.addr;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.pig.pojo.BasePojo;

import java.io.Serializable;
import java.util.Date;

@TableName("p_addr")
public class Addr extends BasePojo {
    @TableId(type = IdType.AUTO)
    private Long addrId;            //地址id
    private Long userId;            //会员id
    private String receiverName;    //收货人姓名
    private String receiverPhone;   //收货人电话
    private String receiverProvince;//省份
    private String receiverCity;    //城市
    private String receiverRegion;  //区
    private String receiverAddress; //详细地址

    public Addr(){
    }

    public Addr(Long addrId, Long userId, String receiverName, String receiverPhone, String receiverProvince, String receiverCity, String receiverRegion, String receiverAddress) {
        this.addrId = addrId;
        this.userId = userId;
        this.receiverName = receiverName;
        this.receiverPhone = receiverPhone;
        this.receiverProvince = receiverProvince;
        this.receiverCity = receiverCity;
        this.receiverRegion = receiverRegion;
        this.receiverAddress = receiverAddress;
    }

    public Addr(Date createdTime, Date modifiedTime, Long addrId, Long userId, String receiverName, String receiverPhone, String receiverProvince, String receiverCity, String receiverRegion, String receiverAddress) {
        super(createdTime, modifiedTime);
        this.addrId = addrId;
        this.userId = userId;
        this.receiverName = receiverName;
        this.receiverPhone = receiverPhone;
        this.receiverProvince = receiverProvince;
        this.receiverCity = receiverCity;
        this.receiverRegion = receiverRegion;
        this.receiverAddress = receiverAddress;
    }

    @Override
    public String toString() {
        return "Addr{" +
                "addrId=" + addrId +
                ", userId=" + userId +
                ", receiverName='" + receiverName + '\'' +
                ", receiverPhone='" + receiverPhone + '\'' +
                ", receiverProvince='" + receiverProvince + '\'' +
                ", receiverCity='" + receiverCity + '\'' +
                ", receiverRegion='" + receiverRegion + '\'' +
                ", receiverAddress='" + receiverAddress + '\'' +
                '}';
    }

    public Long getAddrId() {
        return addrId;
    }

    public void setAddrId(Long addrId) {
        this.addrId = addrId;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getReceiverName() {
        return receiverName;
    }

    public void setReceiverName(String receiverName) {
        this.receiverName = receiverName;
    }

    public String getReceiverPhone() {
        return receiverPhone;
    }

    public void setReceiverPhone(String receiverPhone) {
        this.receiverPhone = receiverPhone;
    }

    public String getReceiverProvince() {
        return receiverProvince;
    }

    public void setReceiverProvince(String receiverProvince) {
        this.receiverProvince = receiverProvince;
    }

    public String getReceiverCity() {
        return receiverCity;
    }

    public void setReceiverCity(String receiverCity) {
        this.receiverCity = receiverCity;
    }

    public String getReceiverRegion() {
        return receiverRegion;
    }

    public void setReceiverRegion(String receiverRegion) {
        this.receiverRegion = receiverRegion;
    }

    public String getReceiverAddress() {
        return receiverAddress;
    }

    public void setReceiverAddress(String receiverAddress) {
        this.receiverAddress = receiverAddress;
    }
}
